package jataaka.io;

import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.Writer;

/**
 * Writes to a file the parsed content
 * 
 * @author Juan Carlos Cancela
 * 
 */
public class WriteTextFile {
	
	/**
	 * copy to a file the parsed content
	 * @param parsedContent the parsed content
	 * @param neigh the neighborhood of parsed content 
	 * @throws IOException if something really nasty occurs
	 */
	public static void createFile(String parsedContent, String neigh) throws IOException {
		Writer output = null;
		File file = new File(neigh+".txt");
		output = new BufferedWriter(new FileWriter(file));
		output.write(parsedContent);
		output.close();
	}
}
